﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace 窗体事件
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        /// <summary>
        /// 按钮的单击事件：public event EventHandler Click;
        /// EventHandler委托的原型：
        /// public delegate void EventHandler(object sender, EventArgs e);
        /// 没有返回值，两个参数 void（object，EventArgs）
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, EventArgs e)
        {
            //MessageBox.Show(sender.ToString());
            //MessageBox.Show(sender.GetType().FullName);

            MessageBox.Show(e.ToString());
        }
    }
}
